<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
  <head>    
    <title></title>
  </head> 
  <body>
  <%
  		String num=request.getParameter("num");
  		int n=Integer.parseInt(num);
  		int i,sum=0;
  		for(i=0;i<=n;i++)
  			sum+=i;		
   %>
   <h3>求和结果</h3>
   <p>1加到<%=n%>的结果为<%=sum%></p>
   
  </body>
</html>












